# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-wapiti-swagger
_pkgname=wapiti_swagger
pkgver=0.1.9
pkgrel=2
pkgdesc='A library for parsing and generating request bodies from Swagger/OpenAPI specifications..'
arch=('any')
url='https://pypi.org/project/wapiti-swagger/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c263054e4dd2825db035ef393a22c269fa41889f4cfa3eae31e9c8527ce0ea0e68af802fb51a2e2262822b3a7c9d3220b9bfd8bd330123b1f66764dbea750007')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

